Skip to main content

Stage 3: Go it alone - Exercise

Description:

This exercise is about Star Wars Characters and their introduction into our API.

What we should be thinking about:

  • The open API Specification for our character endpoints and their responses
  • The character endpoints code
  • The character data access layer
  • The options for Characters - i.e. Selecting data we want to see - tip: similar to film options

Some information about Characters.

  • There are 83 Characters across the Star Wars movies.
  • Each individual Character record on the external Star Wars API can be retrieved by adding an ID to the URL path just like with films

Hints: There should be two Character Endpoints.

Extras:

The Character endpoint for retrieving all Characters should allow the following two parameters to be passed with the endpoint call:

  1. max_items - The total number of characters to retrieve
  2. batch_size - The number of Characters to retrieve from a single request to the external Star Wars API.

Tip: The above two parameters are already handled in the Star Wars API code - check it out again You need to define them for the API specification and the endpoints (**Under 'components') and pass them along so that they reach the Star Wars API.

Good Luck and my the force be with you!